home *** CD-ROM | disk | FTP | other *** search
- Procedure Write_Screen(long_string:maxstr; xcoord,ycoord,color: integer);
-
- var str_len, real_pos, scr_pos: integer;
-
- begin
- str_len:=length(long_string);
- Scr_pos:=0;
- for real_pos:=1 to str_len do
- if scr_pos < 4001 then
- begin
- scr_pos:=((xcoord*2)-1)+(ycoord*160);
- Page_1[scr_pos]:=ord(copy(long_string,real_pos,1));
- Page_1[scr_pos+1]:=Color;
- xcoord:=xcoord+1;
- end
- end;
-
- Procedure Grow_Frame(WindowType, UpperLeftX, UpperLeftY, LowerRightX, LowerRightY, color: Integer);
- var i: integer;
- begin
- Write_Screen(chr(Fc[WindowType,1]),UpperLeftX, UpperLeftY,Color);
- for i:=UpperLeftX+1 to LowerRightX-1 do Write_Screen(chr(Fc[WindowType,2]),i,UpperleftY,color);
- Write_Screen(chr(Fc[WindowType,3]),i+1,UpperleftY,color);
- for i:=UpperLeftY+1 to LowerRightY-1 do
- begin
- Write_Screen(chr(Fc[WindowType,4]),UpperLeftX , i,color);
- Write_Screen(chr(Fc[WindowType,4]),LowerRightX, i,color);
- end;
- Write_Screen(chr(Fc[WindowType,5]),UpperLeftX, LowerRightY, color);
- for i:=UpperLeftX+1 to LowerRightX-1 do Write_Screen(chr(Fc[WindowType,6]),i,LowerrightY,color);
- Write_Screen(chr(Fc[WindowType,7]),i+1,LowerRightY,color)
- end ;
-
- Procedure Grow_Window(x1,y1,x2,y2,c1,c2,wt:integer);
-
- var i,j,p1,p2,p3,p4,sl,knt:integer;
-
- begin
- p1:=x1+trunc((x2-x1)/2);
- p2:=y1+trunc((y2-(y1))/2);
- p3:=p1;
- p4:=p2;
- Scrn_off;
- Move(real_Screen,page_1,4000);
- Scrn_on;
- Set_page($01);
- if p1>p2 then knt:=trunc((x2-x1)/2)
- else knt:=trunc((y2-y1)/2);
- y1:=y1-1;
- y2:=y2-1;
- x1:=x1+1;
- x2:=x2-1;
- for sl:=1 to round(Knt/3) do
- begin
- if p1>(x1-2) then
- p1:=p1-3
- else
- if p1>(x1-1) then
- p1:=p1-2
- else
- if p1>x1 then
- p1:=p1-1;
- if p3<(x2+2) then
- p3:=p3+3
- else
- if p3<(x2+1) then
- p3:=p3+2
- else
- if p3<x2 then
- p3:=p3+1;
- if p2>(y1+2) then
- p2:=p2-3
- else
- if p2>(y1+1) then
- p2:=p2-2
- else
- if p2>y1 then
- p2:=p2-1;
- if p4<(y2-2) then
- p4:=p4+3
- else
- if p4<(y2-1) then
- p4:=p4+2
- else
- if p4<y2 then
- p4:=p4+1;
- Normvideo;
- window(p1,p2,p3,p4);
- clrscr;
- Grow_frame(wt,p1,p2,p3,p4,(c1+(c2*16)));
- end;
- p2:=p2+1;
- p4:=p4+1;
- Add_Window(p1,p2,p3,p4,c1,c2,wt);
- Set_page($00)
- end;